package com.example.learning.demo.zookeeper.config;

import lombok.extern.slf4j.Slf4j;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

/**
 * ClassName ZookeeperConfig
 * Description
 *
 * @author <a href="mailto:xuxb@zjport.gov.cn">xuxb</a>
 * @date 2021/5/13 8:13
 * @since 1.0
 */
@Slf4j
@Configuration
public class ZookeeperConfig {

    @Value("${zookeeper.address}")
    private String connectString;

    @Value("${zookeeper.timeout}")
    private int timeout;

    /** @return the connectString */
    public String getConnectString() {
        return connectString;
    }

    /** @return the timeout */
    public int getTimeout() {
        return timeout;
    }
}
